b2bsoft-ux
TMF622- AddPaymentLinkForOrderID-SF
This API is used to add the payment link in Salesforce for OrderId
Note - To work this functionality the below two points will be satisfied
- 'payload.productOrderItem[].payment[].name' value should be "PayLink"
- 'payload.productOrderItem.action' value should be "add"
URL
https://[localhost]:[port]/b2bsoft-ux/v1/{businessId}/productOrder/{id}
Base Uri Param
name | type | description | required |
---|---|---|---|
businessId | string | Business unit identifier. Example: JM,PA,PR,CR | Y |
Id | string | 'OrderId', the unique identifier to each record in Salesforce | Y |
Header
name | value | description | required |
---|---|---|---|
client_id | string | The client_id identifying the channel. | Y |
client_secret | string | Password associated with the client_id. | Y |
X-Correlation-ID | string | Identifier that correlates HTTP request between a client and server. Any identification model (UUDI, checksum, etc.) can be used, as long as it is a unique value to differentiate a transaction. | Y |
Request
curl --location 'https://nonprod.esb.cloud.lla.com/dev/b2bsoft-ux/v1/PR/productOrder/801dm00000Km9aVAAR' \
--header 'X-Correlation-Id: 678345053765' \
--header 'client_id: abcdefg' \
--header 'client_secret: 1234567890' \
--header 'Content-Type: application/json' \
--data-raw '{
"externalId": "00163913",
"channel": [
{
"id": "sourceSystem",
"name": "B2BSoft"
}
],
"billingAccount": {
"id": "1234567-123445",
"name": "billingAccountNumber"
},
"productOrderItem": [
{
"id": "",
"action": "add",
"payment": [
{
"id": "B2BSOFT payment Link for given Order goes here",
"name": "Paylink"
}
]
}
]
}'
Definitions
Each of the request parameters is detailed.
name | type | description | required |
---|---|---|---|
payload.externalId | string | Order Number it is a unique number assigned to the order in Salesforce and is visible to customers and users. This is used in customer communications, reporting and user interface. | N |
payload.channel | array | Related Channel reference | Y |
payload.channel.id | string | The value will be 'sourceSystem' Note - As per TMF schema it's mandatory and it's not needed for downstream system. | Y |
payload.channel.name | string | Source System information for tracking purpose: Ex: B2BSoft | Y |
payload.billingAccount | object | BillingAccount reference. | N |
payload.billingAccount.id | string | Billing account number (BAN-CAN) | N |
payload.billingAccount.name | string | Billing account name, expected value will be 'billingAccountNumber' | N |
payload.productOrderItem | array | An identified part of the order. | Y |
payload.productOrderItem.id | string | Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) This can be empty string or sequence number Note - As per TMF schema it's mandatory and it's not needed for downstream system. | Y |
payload.productOrderItem.action | string | action to be performed on the payment link Allowed value should be 'add'. | Y |
payload.productOrderItem.payment | array | Payment link information are captured and stored in the order. | Y |
payload.productOrderItem.payment.id | string | B2BSOFT payment Link for given Order goes here | Y |
payload.productOrderItem.payment.name | string | The value will be 'Paylink' | N |
Note - To work this functionality the below two points will be satisfied
- 'payload.productOrderItem[].payment[].name' value should be "PayLink"
- 'payload.productOrderItem.action' value should be "add"
Response
In this section all the possible data structures received by the client at the moment of responding the method are defined.
Possible response success
This section defines all the possible data structures received by the client and that must be considered satisfactory at the time of responding to the method.
[ 200 ]
OK - Patch request processed successfully, response body contains an entity corresponding to the requested resource.
{
"description": "Paylink Link Saved Successfully in Salesforce",
"productOrderItem": [
{
"id": "",
"action": "add"
}
]
}
Definitions
name | type | description | required |
---|---|---|---|
description | string | Success response message | N |
productOrderItem | array | An identified part of the order. Note - As per TMF schema 'productOrderItem' node is mandatory and this doesn't contains downstream system info. | N |
productOrderItem.id | string | Identifier of the line item (generally it is a sequence number 01, 02, 03, ...) | N |
productOrderItem.action | string | action performed on the OrderID | N |
Possible response error
In this section all the possible data structures received by the client are defined and that must be considered as unsatisfactory when responding to the method.
[ 400 ]
Bad Request - the request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat the request without modifications.
{
"errors" : [{
"code" : 400,
"message" : "The request is invalid or not properly formed.",
"description" : "Malformed request syntax, invalid request message framing, or deceptive request routing."
}]
}
[ 401 ]
Unauthorized - The request has not been applied because it lacks valid authentication credentials for the target resource.
{
"errors" : [{
"code" : 401,
"message" : "The user could not be authenticated for this request.",
"description" : "The request has not been applied because it lacks valid authentication credentials for the target resource"
}]
}
[ 403 ]
Forbidden - Indicates that the server understood the request but refuses to fulfill it. If authentication credentials were provided in the request, the server considers them insufficient to grant access. The client SHOULD NOT automatically repeat the request with the same credentials. The client MAY repeat the request with new or different credentials.
[ 404 ]
Not Found - server has not found a resource with that URI. This may be temporary and permanent condition. This status code is commonly used when the server does not wish to reveal exactly why the request has been refused, or when no other response is applicable.
{
"errors" : [{
"code" : 404,
"message" : "The server could not find the requested resource.",
"description" : "The requested operation failed because a resource associated with the request could not be found."
}]
}
[ 405 ]
Method Not Allowed - HTTP method not allowed for this resource. The method specified in the Request-Line is not allowed for the resource identified by the Request-URI.
{
"errors": [{
"code": 405,
"message": "APIKIT:METHOD_NOT_ALLOWED",
"description": "HTTP Method post not allowed for : /{businessId}/productOrder"
}]
}
[ 429 ]
Too Many Requests - client has sent too many requests in a space of time (rate limiting). When a server is under attack or just receiving a very large number of requests from a single party, responding to each with a 429 status code will consume resources. Therefore, servers may drop connections or take other steps instead of responding with the 429 status code, when limiting resource usage.
{
"errors" : [{
"code" : 429,
"message" : "Too many requests.",
"description" : "The client sent too many requests and server is not able to serve them all at the moment."
}]
}
[ 500 ]
Internal Server Error - server encountered an error processing request. This should not happen normally, but it is a generic error message, given when no more specific message is suitable.
{
"errors" : [{
"code" : 500,
"message" : "Internal Server Error",
"description": "The request failed due to an internal error."
}]
}
[ 501 ]
Not implemented - indicates that the server does not support the functionality required to fulfill the request. This is the appropriate response when the server does not recognize the request method and is not capable of supporting it for any resource.
{
"errors" : [{
"code" : 501,
"message" : "Not implemented",
"description" : "Operation PATCH /productOrder for Business Id: xxxx not implemented"
}]
}
[ 502]
Bad Gateway - gateway is available but backend service is not. The server, while acting as a gateway or proxy, received an invalid response from the upstream server it accessed in attempting to fulfill the request.
[ 503 ]
Service Unavailable - temporary maintenance of service, try again later. The implication is that this is a temporary condition which will be alleviated after some delay. If known, the length of the delay will be indicated in a Retry-After header. If no Retry-After is given, the client SHOULD handle the response as it would for a 500 response. Note: The existence of the 503 status code does not imply that a server will use it when becoming overloaded. Servers may simply refuse the connection.